package com.hitqz.robot.driver.util;

public enum KcPositionStatusEnum {
    //定位状态 0-失败 1-成功 2-定位中 3-定位完成
    FAIL(0,"失败"),
    SUCCESS(1,"成功"),
    LOADING(2,"定位中"),
    FINISH(3,"定位完成"),


    ;

    private final int status;

    private final String des;

    KcPositionStatusEnum(int status, String des) {
        this.status = status;
        this.des = des;
    }

    public int getStatus() {
        return status;
    }

    public String getDes() {
        return des;
    }

    public static KcPositionStatusEnum getEnum(int status) {
        for (KcPositionStatusEnum value : KcPositionStatusEnum.values()) {
            if(value.status == status) {
                return value;
            }
        }
        return null;
    }

    public static String getDes(int status) {
        for (KcPositionStatusEnum value : KcPositionStatusEnum.values()) {
            if(value.status == status) {
                return value.des;
            }
        }
        return "";
    }

}
